<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>
    <style type="text/css">
        @media (max-width: 375px) {
            .edit-form tr td input{width:100%;}
            .edit-form tr th:first-child,.edit-form tr td:first-child{
                width:20%;
            }
            .edit-form tr th:nth-last-of-type(-n+2),.edit-form tr td:nth-last-of-type(-n+2){
                display: none;
            }
        }
        .edit-form table > tbody > tr td a.btn-delcfg{
            visibility: hidden;
        }
        .edit-form table > tbody > tr:hover td a.btn-delcfg{
            visibility: visible;
        }
    </style>
        <div class="panel panel-default panel-intro">
            <div class="panel-heading">
                {:build_heading(null, false)}
                <ul class="nav nav-tabs">

                    <li>
                        <a href="#addcfg" data-toggle="tab"><i class="fa fa-plus"></i></a>
                    </li>
                </ul>
            </div>

            <div class="panel-body">
                <div id="myTabContent" class="tab-content">

                    <div class="tab-pane fade " id="">
                        <div class="widget-body no-padding">
                            <form id="{$vo.name}-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/edit')}">
                                <table class="table table-striped">
                                    <thead>
                                    <tr>
                                        <th width="15%">{:__('Title')}</th>
                                        <th width="68%">{:__('Value')}</th>
                                        <th width="15%">{:__('Name')}</th>
                                        <th width="2%"></th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td></td>
                                        <td>
                                            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                                            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                        </td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </form>
                        </div>
                    </div>

                    <div class="tab-pane fade" id="addcfg">
                        <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/add')}">
                            <div class="form-group">
                                <label for="type" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <select name="row[type]" class="form-control selectpicker">

                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="group" class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <select name="row[group]" class="form-control selectpicker">

                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required; length(3~30); remote(general/config/check)" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="value" class="control-label col-xs-12 col-sm-2">{:__('Value')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <input type="text" class="form-control" id="value" name="row[value]" value="" data-rule="" />
                                </div>
                            </div>
                            <div class="form-group hide" id="add-content-container">
                                <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
                                <div class="col-xs-12 col-sm-4">
                            <textarea name="row[content]" id="content" cols="30" rows="5" class="form-control" data-rule="required">value1|title1
value2|title2</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="tip" class="control-label col-xs-12 col-sm-2">{:__('Tip')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <input type="text" class="form-control" id="tip" name="row[tip]" value="" data-rule="" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rule" class="control-label col-xs-12 col-sm-2">{:__('Rule')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <input type="text" class="form-control" id="rule" name="row[rule]" value="" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="extend" class="control-label col-xs-12 col-sm-2">{:__('Extend')}:</label>
                                <div class="col-xs-12 col-sm-4">
                                    <textarea name="row[extend]" id="extend" cols="30" rows="5" class="form-control" data-rule=""></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2"></label>
                                <div class="col-xs-12 col-sm-4">
                                    <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </div>
                            </div>

                        </form>

                    </div>
                </div>
            </div>
        </div>
    </title>
</head>
<body>

</body>
</html>